<template>
  <div>
    <slot name="insertFooter"></slot>
    <el-button v-if="showCancelBtn" @click="handleCancel" v-bind="cancelButtonProps">
      {{ cancelText }}</el-button>
    <slot name="centerFooter"></slot>
    <el-button :loading="confirmLoading" v-if="showOkBtn" v-bind="okButtonProps" :type="okType" @click="handleOk">
      {{ okText }}
    </el-button>
  </div>
</template>

<script setup lang="ts">
import { basicProps } from '../props';


defineProps(basicProps)
const emit = defineEmits<{
  (e: 'ok'): void,
  (e: 'cancel'): void
}>()

function handleOk() {
  emit('ok');
}

function handleCancel() {
  emit('cancel');
}
</script>